use dta\Turnout_District_Level, clear 

sort year PR_district
drop _merge
merge year PR_district using dta\AlternativeMargin
drop if _merge==2 /* PR-districts not in sample */

twoway (kdensity margin if year<1920, lwidth(thin)) (kdensity min_distance1 if year>1920 & year<1930, lwidth(medthick)), ///
title("") xtitle(Margin) ytitle("") legend(order(1 "1909-1918" 2 "1921-1927") pos(1) ring(0) col(1)) ///
plotregion(lcolor(white) ilcolor(white)) graphregion(fcolor(white)) scheme(s2mono) 
*graph export figures\kdensity_margin.tif, replace
*graph export figures\kdensity_margin.eps, replace
graph export figures\Figure4.tif, replace
graph export figures\Figure4.eps, replace
